<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2022/5/12
 * Time: 12:23
 */

namespace app\model\pay;


use app\model\BaseModel;

class ApplepayRequestLogModel extends BaseModel
{
    protected $table = 'video_applepay_request_log';

    protected $primaryKey = 'id';

    public $timestamps = false;

    protected static $instance;

    public static function getInstance()
    {
        //        if(is_object(self::$instance)){
//            return self::$instance;
//        }

        return new self();
    }

    public function insertData($param)
    {
        $data['request_param'] = json_encode($param['request_param'],256);
        $data['reponse_result'] = json_encode($param['reponse_result'],256);
        $data['request_url'] = $param['request_url'];
        $data['request_name'] = $param['request_name'];
        $data['trade_no'] = $param['trade_no'];

        $id = $this->insertGetId($data);

        return $id;
    }
}